package com.ruoyi.system.service.impl;

import com.ruoyi.common.core.domain.dto.CustomersDto;
import com.ruoyi.common.core.domain.dto.PlatformsDto;
import com.ruoyi.common.core.domain.dto.ProgressDto;
import com.ruoyi.common.core.domain.entity.CustomerProgress;
import com.ruoyi.common.core.domain.entity.Customers;
import com.ruoyi.common.core.domain.entity.Platforms;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.system.mapper.CustomersMapper;
import com.ruoyi.system.mapper.PlatformsMapper;
import com.ruoyi.system.service.ICustomerService;
import com.ruoyi.system.service.IPlatformService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 参数配置 服务层实现
 * 
 * @author ruoyi
 */
@Service
public class PlatformServiceImpl implements IPlatformService
{
    @Autowired
    private PlatformsMapper platformsMapper;


    @Override
    public List<Platforms> selectAll(PlatformsDto platformsDto) {
        return platformsMapper.selectAll(platformsDto);
    }

    @Override
    public Platforms selectByPrimaryKey(Long id) {
        return platformsMapper.selectByPrimaryKey(id);
    }

    @Override
    public int insert(Platforms record) {
        return platformsMapper.insert(record);
    }

    @Override
    public int updateByPrimaryKey(Platforms record) {
        return platformsMapper.updateByPrimaryKey(record);
    }

    @Override
    public void deleteByPrimaryKey(String  ids) {
        Long[] dataIds = Convert.toLongArray(ids);
        for (Long dataId : dataIds)
        {
            platformsMapper.deleteByPrimaryKey(dataId);
        }
    }
}
